---
id: auth-session
title: "auth.session()"
slug: auth-session
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

Returns the session data, if there is an active session.

<Tabs
  defaultValue="js"
  groupId="libraries"
  values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>

<TabItem value="js">

```js
const session = supabase.auth.session()
```


</TabItem>
<TabItem value="py">

```py
# Not yet implemented
```


</TabItem>

</Tabs>

















## Examples

### Get the session data



<Tabs
  defaultValue="js"
  groupId="libraries"
  values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>

<TabItem value="js">

```js
const session = supabase.auth.session()
```


</TabItem>
<TabItem value="py">

```py
# Not yet implemented
```


</TabItem>

</Tabs>